<script>
    var str = false + 1;
    document.write(str);  //1,false 转为0，0 + 1=1

    var demo = false == 1; 
    document.write(demo); //false,false转化成数字0，0不等于0，为false

    if(typeof(a)&&-true + (+undefined) + '') { 
      //'undefined' && -1 + NaN + ''  
      //'undefined' && 'NaN'
        document.write('基础')
    }

    if(11 + '11' * 2 == 33){
        document.write('基础扎实')
    }

    !!' ' + !!'' - !!false||document.write('你觉得能打印，你就是猪');
//  true  + false -false = 1 ,||非，1满足条件，不看后面
</script>

<script>
    // (window.foo || window.foo = 'bar'); //||或的优先级高
    (window.foo || (window.foo = 'bar')) //先读括号，赋值window.bar,再读window.bar ,等于 'bar' 
    求window.foo的值

</script>